package com.android.semita.controller;

import java.util.ArrayList; 
import com.android.semita.InvoiceItemMapper;
import com.android.semita.model.InvoiceItem;


  

public class InvoiceItemController {
	InvoiceItemMapper invoiceItemMapper = new InvoiceItemMapper();
	
	double total = 0.00D;
	public InvoiceItemController() {
		 
	}
	
	public Double getInvoiceItemTotalAmount()
	{
		return this.total;
		
	}
	
	public ArrayList<InvoiceItem> getInvoiceItemsFromJSON(String JSONString)
	{
		ArrayList<InvoiceItem> invoiceItems = new ArrayList<InvoiceItem>();
		
		invoiceItems = invoiceItemMapper.getInvoiceItemsFromJSON(JSONString);
		this.total = invoiceItemMapper.getTotal();
		
		return invoiceItems;
	}
}
